<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of demoGenData</title>
  <meta name="keywords" content="demoGenData">
  <meta name="description" content="Generate data drawn form a mixture of Gaussians.">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<!-- menu.html classify -->
<h1>demoGenData
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>Generate data drawn form a mixture of Gaussians.</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function [X0,H0,X1,H1] = demoGenData1(n0,n1,k,d,sep,ecc,frc) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"> Generate data drawn form a mixture of Gaussians.

 For definitions of separation and eccentricity see:
  Sanjoy Dasgupta, &quot;Learning Mixtures of Gaussians&quot;, FOCS, 1999.
  http://cseweb.ucsd.edu/~dasgupta/papers/mog.pdf

 USAGE
  [X0,H0,X1,H1] = demoGenData(n0,n1,k,d,sep,ecc,[frc])

 INPUTS
  n0     - size of training set
  n1     - size of testing set
  k      - number of mixture components
  d      - data dimension
  sep    - minimum separation degree between clusters (sep &gt; 0)
  ecc    - maximum eccentricity of clusters (0 &lt; ecc &lt; 1)
  frc    - [0] frac of points that are noise (uniformly distributed)

 OUTPUTS
  X0     - [n0xd] training set data vectors
  H0     - [n0x1] cluster membership in [1,k] (and -1 for noise)
  X1     - [n1xd] testing set data vectors
  H1     - [n1x1] cluster membership in [1,k] (and -1 for noise)

 EXAMPLE
  n0=1000; k=5; d=2; sep=2; ecc=1; frc=0;
  [X0,H0,X1,H1] = demoGenData(n0,n0,k,d,sep,ecc,frc);
  figure(1); clf; visualizeData( X0, 2, H0 ); title('train');
  figure(2); clf; visualizeData( X1, 2, H1 ); title('test');

 See also <a href="visualizeData.html" class="code" title="function visualizeData( X, k, IDX, types, C )">visualizeData</a>, <a href="demoCluster.html" class="code" title="">demoCluster</a>

 Piotr's Computer Vision Matlab Toolbox      Version 3.20
 Copyright 2014 Piotr Dollar.  [pdollar-at-gmail.com]
 Licensed under the Simplified BSD License [see external/bsd.txt]</pre></div>





<!-- Start of Google Analytics Code -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4884268-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<!-- end of Google Analytics Code -->

<hr><address>Generated by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" target="_parent">m2html</a></strong> &copy; 2003</address>
</body>
</html>
